<?php
class ProductRelatedEditAction extends AdminAction
{
	public function __construct()
	{
		parent::__construct();
		$this->responseType = 'tpl';
		$this->layout = 'admin';
	}

	public function execute()
	{
		$prService		= new ProductRelatedService();
		$iid			= $this->context->get('iid');
		$type			= $this->context->get('type');
		$this->data['info']	= $prService->get($iid,$type);
		if($this->data['info'])
		{
			$this->data['id']	= $this->data['info']['id'];
		}
		else
		{
			$this->data['id']	= 0;
		}
		$this->data['iid']		= $iid;
		$this->data['type']		= $type;
		
		$this->data['menu']		= 'post';
		$this->data['submenu']	= 'post_post';
	}
}
